package top.gangster.lunan.templateservice.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import top.gangster.lunan.result.Result;
import top.gangster.lunan.templateservice.feign.imp.UserClientImpl;

@FeignClient(name = "service-user",fallback = UserClientImpl.class)
@Component
public interface UserClient {

	/**
	 * 根据id查询指定用户
	 * @param id 用户id
	 * @return User
	 */
	@GetMapping("/userservice/user/{id}")
	public Result getUserById(@PathVariable String id);
}
